#!/usr/bin/env python

#TODO add setup.py gen
import yaml, os
file_name = os.path.dirname(__file__) + '/../gmultiserver/config.yaml'
stream = file(file_name, 'r')
cfg = yaml.load(stream)
if cfg is None:
	print 'Wrong config.yaml'
	exit(1)

f = open('setup.py', 'w')

f.write('#!/usr/bin/env python\nfrom setuptools import setup\n')
f.write('cfg = %s\n' % str(cfg['package']))
f.write('setup(**cfg)\n')

f.close()
